<template>
  <modeler ref="modelerForm"></modeler>
</template>

<script>
  import Modeler from '@/components/activiti/Modeler'
  import { getAction } from '@/api/manage'

  export default {
    name: 'ModelerEdit',
    components: {
      Modeler
    },
    data() {
      return {
        id: this.$route.query.modelId,
        url: {
          getModelById: '/act/model/getModelById'
        }
      }
    },
    created() {
      this.loadProcessJsonData()
    },
    methods: {
      loadProcessJsonData() {
        getAction(this.url.getModelById, { id: this.id }).then(res => {
          if (res.success) {
            this.$refs.modelerForm.processModel = res.result
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>